home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre2.z / postgre2 / doc / release3.0.me < prev    next >
Encoding:
Text File  |  1992-08-27  |  12.0 KB  |  436 lines

  1. .\"
  2. .\"    release3.0.me:  postgres version 3.0 release notes.  print using
  3. .\"            psroff -me.
  4. .\"
  5. .nr pi 3n
  6. .nr si 2n
  7. .nr pp 11
  8. .nr tp 11
  9. .nr sp 11
  10. .de RV
  11. .ie "\\$2"" \
  12. \{\
  13. .    ds VN "0.0
  14. .    ds VD "(No date)
  15. .    ds VT "UNAUDITED VERSION
  16. .\}
  17. .el \
  18. \{\
  19. .    ds VN \\$3
  20. .    ds VD \\$4
  21. .    ie "\\$7"Exp" \
  22. .        ds VT "DRAFT
  23. .    el \
  24. .        ds VT \\$7
  25. .\}
  26. ..
  27. .de CW
  28. \\f(CW\\$1\\fP\\$2
  29. ..
  30. .RV $Header: /private/postgres/doc/RCS/release3.0.me,v 1.8 1991/08/18 05:20:58 kemnitz Exp $
  31. .ds PG "\\s-2POSTGRES\\s0
  32. .ds PQ "\\s-2POSTQUEL\\s0
  33. .ce 99
  34. .ft B
  35. .ps 14
  36. \*(PG Version 3
  37. .sp 0.5v
  38. Release Notes
  39. .sp
  40. .ps 11
  41. \*(VD
  42. .ce 0
  43. .he '\*(PG V3.0 Release Notes'%'\*(VD'
  44. .sp 2
  45. .sh 1 "Introduction"
  46. .pp
  47. These are the release notes for version 3.0
  48. of the \*(PG database system from UC Berkeley.
  49. The database system and its installation procedure
  50. are covered in detail in the setup document for this release.
  51. Here,
  52. we cover only the most important differences from release
  53. 2.1 and earlier versions of the system.
  54. .sh 1 "Changes to \*(PQ"
  55. .pp
  56. The \*(PQ query language has been changed to better support
  57. remote access to databases over a network,
  58. and to provide more control over data storage.
  59. .sh 2 "Createdb, destroydb"
  60. .pp
  61. The
  62. .i createdb
  63. and
  64. .i destroydb
  65. commands have been added to the query language.
  66. Syntax is
  67. .CW "createdb dbname"
  68. or
  69. .CW "destroydb dbname" .
  70. There must be a database open while these commands are being run.
  71. We recommend running these queries from inside the
  72. .q template1
  73. database.
  74. .pp
  75. This change was made in order to permit users to create and
  76. destroy databases without logging onto the machine on which
  77. the postmaster is running.
  78. .sh 2 "Vacuum"
  79. .pp
  80. The
  81. .i vacuum
  82. command has been added to \*(PQ.
  83. This command causes the open database to be vacuumed.
  84. Vacuuming updates statistics on relations,
  85. cleans out records from aborted transactions,
  86. and sets commit times on committed transactions.
  87. Syntax is
  88. .CW vacuum .
  89. .pp
  90. This query may be submitted at any time.
  91. It is a good idea to update statistics after copying in a large
  92. file,
  93. or deleting a large number of records from a class.
  94. .pp
  95. This change was made in order to get rid of the
  96. .i vacuum
  97. Unix program,
  98. which was very large and required maintenance separate from
  99. the \*(PG backend.
  100. .sh 2 "Create syntax changes"
  101. .pp
  102. The
  103. .i create
  104. command for creating new classes has some new optional specifications.
  105. The syntax
  106. .(b
  107. .ft CW
  108. create foo (a = int4) store = "magnetic disk"
  109. .ft
  110. .)b
  111. will cause the new class
  112. .q foo
  113. to be created,
  114. and to be stored on magnetic disk.
  115. Similarly,
  116. .(b
  117. .ft CW
  118. create foo (a = int4) archive = heavy arch_store = "magnetic disk"
  119. .ft
  120. .)b
  121. creates class
  122. .q foo
  123. as an archived class;
  124. historical data is stored on magnetic disk.
  125. .pp
  126. As the second example above implies,
  127. archival of user data is supported in the current release.
  128. Scans of archived data are planned and executed for historical
  129. queries,
  130. and the vacuum cleaner
  131. (see
  132. .i vacuum ,
  133. above)
  134. moves data from the current store to the archive.
  135. .pp
  136. In the released system,
  137. the only possible location for user data is
  138. .q "magnetic disk" ;
  139. this is also the default.
  140. The additional specifications for storage managers
  141. were added to support research being done at Berkeley.
  142. .pp
  143. Some caveats here:
  144. Since
  145. .q store
  146. and
  147. .q arch_store
  148. are new keywords,
  149. they may not be used in queries except as shown above.
  150. In addition,
  151. if an archived relation is destroyed,
  152. historical queries are no longer guaranteed to return
  153. the correct answer.
  154. .sh 2 "Portals"
  155. .pp
  156. The command
  157. .(b
  158. .ft CW
  159. retrieve portal myportal (pg_user.all)
  160. .ft
  161. .)b
  162. in release 2.1 and earlier versions of \*(PG could be
  163. issued as a stand-alone transaction.
  164. This violated isolation requirements,
  165. since the results from the retrieve were not actually
  166. instantiated until they were
  167. .CW fetch ed,
  168. but locks were released on successful completion of the
  169. .CW retrieve .
  170. .lp
  171. As of release 3.0,
  172. operations on portals must be done inside of
  173. \f(CWbegin\fP/\f(CWend\fP
  174. transaction blocks.
  175. This change may require you to rewrite libpq application
  176. programs,
  177. if your applications use portals outside of transaction blocks.
  178. The correct interaction is now
  179. .(b
  180. .ft CW
  181. begin
  182. retrieve portal myportal (pg_user.all)
  183. fetch 10 in myportal
  184.     \&...
  185. close myportal
  186. end
  187. .ft
  188. .)b
  189. .lp
  190. If the user fails to close a portal before the end of the
  191. transaction block,
  192. it is freed automatically,
  193. and all resources it holds are released.
  194. .sh 1 "Unix command changes"
  195. .pp
  196. The names and behavior of some Unix commands
  197. shipped with \*(PG have changed in the new release.
  198. .sh 2 "Createdb, Destroydb"
  199. .pp
  200. The
  201. .i createdb
  202. and
  203. .i destroydb
  204. commands are now shell scripts,
  205. rather than compiled programs,
  206. and submit queries via the terminal monitor.
  207. The postmaster must be running in order for these scripts to
  208. work.
  209. For the sake of backward compatibility,
  210. we have provided two different scripts
  211. (createdb.sh and destroydb.sh)
  212. that run without using the postmaster or shared resources.
  213. Use of these two scripts is discouraged;
  214. if at all possible,
  215. use
  216. .i createdb
  217. and
  218. .i destroydb
  219. instead.
  220. .pp
  221. This change was made to make creating and destroying databases
  222. from remote machines easier,
  223. and to get rid of extra binaries.
  224. Since \*(PQ now provides both of these as query language commands,
  225. special programs are no longer necessary.
  226. .sh 2 "Vacuum, Vcontrol"
  227. .pp
  228. Since the query language now supports the
  229. .i vacuum
  230. command,
  231. the
  232. .i vacuum
  233. Unix program has been replaced by a shell script
  234. which submits a query via the terminal monitor.
  235. The
  236. .i vctontrol
  237. program is no longer shipped with \*(PG.
  238. The syntax for the new script is
  239. .CW "vacuum dbname" .
  240. This opens a connection to a backend using database
  241. .q dbname
  242. and vacuums it.
  243. .pp
  244. We strongly recommend that production databases be vacuumed nightly.
  245. This will keep statistics current,
  246. and permit the query optimizer to make better choices
  247. in planning user queries.
  248. The easiest way to make this happen is to add entries of the form
  249. .CW "vacuum dbname"
  250. to your crontab file.
  251. .pp
  252. This change was made to get rid of the separate
  253. .i vacuum
  254. program,
  255. ease maintenance,
  256. and make the \*(PG distribution smaller.
  257. .sh 2 "Monitor"
  258. .pp
  259. The terminal monitor takes several new flags.
  260. The
  261. .q \-q
  262. flag suppresses conversational output.
  263. The new
  264. .q \-c
  265. flag causes the argument immediately following it to be executed
  266. as a \*(PQ query;
  267. this overrides the normal interactive behavior of the monitor.
  268. For example,
  269. .(b
  270. .ft CW
  271. monitor -c "retrieve (pg_class.all)" mydb
  272. .ft
  273. .)b
  274. executes the query
  275. .q "retrieve (pg_class.all)"
  276. on
  277. .q mydb ,
  278. sending the output to stdout.
  279. After the query completes,
  280. the terminal monitor exits.
  281. .pp
  282. The \-c switch was added to make it easier to use
  283. \*(PQ queries in shell scripts.
  284. The \-q switch was added because
  285. .q "I live to serve you"
  286. stopped seeming cute at three o'clock one morning.
  287. .sh 2 "Initdb"
  288. .pp
  289. The
  290. .i initdb
  291. shell script initializes the
  292. template database for \*(PG.
  293. In general,
  294. it is run by the installation process,
  295. and need never be run by users.
  296. .i Initdb
  297. creates the data/ directory hierarchy in $POSTGRESHOME,
  298. sets up some control files,
  299. and populates the template database
  300. .i template1 .
  301. .pp
  302. This change was made to get rid of the
  303. .q "baby backend"
  304. that handled bootstrapping of \*(PG in previous releases.
  305. The functionality of that program was rolled into the
  306. standard backend.
  307. In addition,
  308. .i initdb
  309. substantially simplifies the installation procedure,
  310. and gets rid of confusing syntax required for
  311. .i createdb
  312. in earlier releases.
  313. .sh 1 "General System Changes"
  314. .pp
  315. The new release includes bug fixes to many problems
  316. reported in version 2.1 and previous releases.
  317. We have also sped the code up substantially.
  318. This section contains a partial list of enhancements
  319. made since release 2.1.
  320. .sh 2 "Multi-User Stability"
  321. .pp
  322. We have done extensive rewriting and testing
  323. of the code that handles concurrent access,
  324. and believe that \*(PG is much better suited for
  325. multi-user applications than it has been in the past.
  326. The lock manager has been entirely rewritten,
  327. and exclusion is guaranteed around critical sections.
  328. Standard two-phase locking is provided on user tables.
  329. System catalogs and indices have locking strategies
  330. that provide higher concurrency.
  331. .pp
  332. As a new feature,
  333. if one \*(PG backend terminates abnormally (dumps core),
  334. then all backends running concurrently are killed and
  335. restarted.
  336. This is to guarantee that any data corrupted by the errant
  337. backend are destroyed,
  338. and not flushed to disk or propagated to other backends.
  339. .pp
  340. We are particularly interested in reports of bugs caused
  341. by concurrent access to data by multiple users.
  342. .sh 2 "Storage Manager Switch"
  343. .pp
  344. Previous releases of \*(PG had built-in assumptions
  345. about the underlying storage medium.
  346. All data were assumed to reside on magnetic disk.
  347. Version 3.0 removes this assumption from the code.
  348. Data may reside on other media,
  349. at the discretion of the database administrator.
  350. Access is location-transparent.
  351. .pp
  352. At Berkeley,
  353. we have implemented a storage manager for a Sony optical disk
  354. WORM jukebox
  355. and for persistent main memory.
  356. Neither of these is supported in the released system.
  357. .sh 2 "Executor Rewrite"
  358. .pp
  359. The query executor has been almost completely rewritten,
  360. in order to simplify code maintenance and to speed up execution.
  361. Several memory leaks have been plugged,
  362. and performance has been substantially improved.
  363. .sh 2 "Query Rewrite Rule System"
  364. .pp
  365. The query rewrite rule system has been completely rewritten for this release.
  366. This version implements the almost all the rewrite rule semantics specified in
  367. "On Rules, Procedures, Caching, and Views" by Stonebraker et al. and closely
  368. parallels the 'instance' level rule system.  It offers performance advantages
  369. over 'instance' rules in some applications.
  370. .pp
  371. Views, versions, and \*(PQ functions are now supported via the rewrite system.
  372. See the 'define rule(commands)' section of the reference manual for details.
  373. .sh 2 "Aggregates"
  374. .pp
  375. Aggregates (or column-valued functions) are now supported.  The Reference
  376. Manual describes how to define and use aggregates in detail.
  377. .pp
  378. .sh 2 "Large Objects"
  379. .pp
  380. Large Objects are now supported as "filename as an ADT".  The Reference
  381. Manual describes the large object implementation in detail.  The 3.0
  382. implementation is the first-cut implementation; a more fully-featured
  383. implementation will be available in Release 4.0.
  384. .pp
  385. .sh 1 "Known Bugs"
  386. .pp
  387. There are a few known bugs that we were unable to fix in the current
  388. release.  
  389. .sh 2 "Indices and the Instance Level Rule System"
  390. .pp
  391. The Instance Level Rule System essentially ignores indices, so if you are
  392. defining a rule on an indexed attribute, you should use the Query Rewrite
  393. rule system.
  394. .sh 2 "Retrieve Into and failed backends"
  395. .pp
  396. If a backend fails while in the course of executing a Retrieve Into query,
  397. a spurious file, with the same name as the target class of the Retrieve Into,
  398. will be left in the database directory.  This file can be safely deleted by the
  399. database DBA. 
  400. .sh 2 "Large Objects and failed backends"
  401. .pp
  402. If a backend fails while it is manipulating large objects, spurious large
  403. object files will be left in the database directory.  Also, there is no
  404. mechanism for getting rid of large objects which are returned by functions
  405. but not stored in instances.
  406. .sh 2 "Postgres User Id's and Unix UID's"
  407. .pp
  408. The userid of a Postgres registered user
  409. .b must
  410. match the user's UNIX user id.  In the release, the user id of the Postgres
  411. user in /etc/passwd is presumed to be 6.  If it is not, Postgres will not run
  412. properly.  This can be overcome for those who do not wish to renumber the
  413. userid field in their password files by editing the file
  414. .lp
  415. .b src/lib/H/catalog/pg_user.h
  416. .lp
  417. and changing the "usesysid" field for the Postgres user to the one used
  418. in /etc/passwd at your site
  419. .b before
  420. compiling and installing Postgres.  The line in this file you wish
  421. to change looks like this:
  422. .(1
  423.  
  424. DATA(insert OID =    6 ( postgres 6 t t t t ));
  425.  
  426. .)l
  427. .lp
  428. If you change the two 6's above to the value used for the "postgres"
  429. user in your /etc/passwd file, this problem can be avoided.
  430. .pp
  431. .sh 1 "Machine-dependent Problems"
  432. .pp
  433. Postgres has been known to crash SunOS 4.0.3 on Sparcstations, due to a SunOS
  434. bug in shared memory.  It appears to work on SunOS 4.1 and higher, so any
  435. reports of crashes on SunOS 4.1 and higher are appreciated.
  436.